$(function(){

    $(function(){
        var winHeight = $(document).scrollTop();
        $(window).scroll(function() {
            var scrollY = $(document).scrollTop();

            if (scrollY > 70){
                $('header').css('position','fixed');
                $('header').css('top','0');
                $('.fix-zhan').show()
                $('header').addClass('wow animated fadeInDown ')
                $('header').css('border-color','#BEBEBE')
            }

        });
    });

$(function(){

   var changeW=function() {
       $('.g-top-zhe').width($('.g-top img').width())
       $('.g-top-zhe').height($('.g-top img').height())
       $('.zhe-zhao').height($('.zhe-img').height())
   }()
    window.onresize = function(){
        $('.g-top-zhe').width($('.g-top img').width())
        $('.g-top-zhe').height($('.g-top img').height())
        $('.zhe-zhao').height($('.zhe-img').height())
    }

    $('.g-conta .col-md-4 .g-hidden').mousemove(function(){
        $(this).find($('.g-miaoshu')).addClass('wow animated fadeIn')
        $(this).prev('.g-top-zhe').fadeIn()

    })
    $('.g-conta .col-md-4 .g-hidden').mouseleave(function(){
        $(this).find($('.g-miaoshu')).removeClass('wow animated fadeIn')
        $(this).prev('.g-top-zhe').fadeOut()
    })

    new WOW().init();

})
})

$(function(){
    $(".language").on("click", function() {
        $(this).find(".on").removeClass("on").siblings().addClass("on");
    });
    menu();
    function menu() {
        var width = $(window).width();
        if(width > 767) {
            $(".nav>li").hover(function() {
                $(this).find(".menu").slideDown(150);
            }, function() {
                $(this).find(".menu").slideUp(150);
            });
        }
    }
})

$(function(){
    slunbo();
    function slunbo(){
        var swidth = $(window).width();
        var slidesPerView = 3;
        if(swidth > 768){
            slidesPerView = 5;
        }
        var mySwiper = new Swiper ('.swiper-container', {
            // 如果需要前进后退按钮
            pagination: '.swiper-pagination',
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev',
            slidesPerView : slidesPerView,
            centeredSlides: true,
            paginationClickable: true,
    })
    }
    $(".swiper-slide").hover(function(){
        $(this).addClass("h");
    }, function(){
        $(this).removeClass("h");
    });
})

